import ComFetch from 'common/fetch'

const utilFetch = {
  login () {
    // http://yuexunsoft.88ip.cn:6060/szhg-baseWeb/basePhone/login/checkLogin?loginNumber=13603085899&password=cZuJK61nv94=&imei=866014033451794#
    // 登录获取令牌 lsz /OWEx+Tv+1rDppEwHmLX+H3cmhJ8oXjc/8K31T1Ck4TyjvUX1AEldg==
    ComFetch.post('/basePhone/login/checkLogin', {
      loginNumber: '13603085899',
      password: 'cZuJK61nv94=',
      imei: '866014033451794#'
    })
      .then(res => {
        if (res.data) {
          let content = res.data.content || ''
          content = JSON.parse(content)
          let session = content.session
          localStorage.setItem('session', session)
        }
      })
      .catch(res => {})
  }
}

export default utilFetch
